package com.opo5.logisticsmanagement.controller;

import com.opo5.logisticsmanagement.Vo.PageVo;
import com.opo5.logisticsmanagement.common.R;
import com.opo5.logisticsmanagement.domain.DTFRParam;
import com.opo5.logisticsmanagement.service.DepotTransferRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/dtRecord")
@CrossOrigin
public class DepotTransferRecordController {

    @Autowired
    private DepotTransferRecordService dtrService;

//    @GetMapping
//    public R test(){
//        System.out.println("这是一个测试");
//        return R.success("这是一个测试");
//    }

    @GetMapping("/{currentPage}/{pageSize}")
    public R getTransferRecord(@PathVariable Integer currentPage, @PathVariable Integer pageSize, DTFRParam dtfrParam){
        PageVo recordPage = dtrService.getMaterialTransferRecord(currentPage, pageSize,dtfrParam);
        return R.success(recordPage);
    }


}
